using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace TroTro
{

    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game1 : Game
    {
        #region Fields

        readonly GraphicsDeviceManager _graphics;
        SpriteBatch _spriteBatch;
        Texture2D _bg;
        Texture2D _roadTex;

        //game objects
        private TroTro _troTro;
        private Score _score;
        private Timing _timing;
        private Road _road1;
        private Road _road2;
        private Road _road3;
        private CarHealth _carHealth;
        private Texture2D _carRadio;
        private Radio _radio;
        private SpeedGauge _speedGauge;
        private Texture2D _messageBox;
        private bool _dispMessage = false;
        private bool _scoreAdded = false;
        private int _dispNumber;

        //fonts
        private SpriteFont _titleFont;
        private SpriteFont _selectionFont;
        private SpriteFont _messageBoxFont;
        private SpriteFont _radioFontScreen;
        private SpriteFont _radioFontButtons;

        //Text objects
        private Text _title;
        private Text _play;
        private Text _exit;
        private Text _tryAgain;
        private Text _exitToMenu;
        private Text _displayScore;

        private String _endScore;

        //Menu controls
        private int _selected;
        private const int MainMenuItemCount = 2;
        private const int Play = 0;
        private const int EXIT = 1;

        private int _endSelected;
        private const int EndMenuItemCount = 2;
        private const int TryAgain = 0;
        private const int ExitToMenu = 1;

        //speed controls
        private float _carSpeed;

        //game logic controls
        private Boolean _started = false;
        private Boolean _ended = false;

        //Sound effects
        private SoundEffect _potholeSound;
        private SoundEffectInstance _potholeSoundInstance;
        private bool _playNoise;

        #region Messages

        private string _msg1_1;
        private string _msg1_2;
        private string _msg1_3;
        private string _msg1_4;
        private string _msg2_1;
        private string _msg2_2;
        private string _msg2_3;
        private string _msg2_4;
        private string _msg2_5;
        private string _msg3_1;
        private string _msg3_2;
        private string _msg3_3;
        private string _msg3_4;
        private string _msg4_1;
        private string _msg4_2;
        private string _msg4_3;
        private string _msg4_4;
        private string _msg5_1;
        private string _msg5_2;
        private string _msg5_3;
        private string _msg5_4;
        private string _msg6_1;
        private string _msg6_2;
        private string _msg6_3;
        private string _msg6_4;
        private string _msg7_1;
        private string _msg7_2;
        private string _msg7_3;

        #endregion

        public float CarSpeed 
        {
            get { return _carSpeed; }
            set { _carSpeed = MathHelper.Clamp(value, 0, 1000); }
        }

        //private Random _rand = new Random();

        //public Random Number
        //{
        //    get { return _rand; }
        //    set { _rand = value; }
        //}

        public float RoadSpeed { get; set; }

        //lists of objects
        private List<Pothole> _potholes;
        

        //constants
        private const int Screenwidth = 1200;
        private const int Screenheight = 700;
        //private const int Screenwidth = 800;
        //private const int Screenheight = 600;

        #endregion

        #region XNA Methods

        #region Constructor

        public Game1()
        {
            _graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

        #endregion

        #region Initialize

        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            _graphics.PreferredBackBufferHeight = Screenheight;
            _graphics.PreferredBackBufferWidth = Screenwidth;
            _graphics.ApplyChanges();

            base.Initialize();
        }

        #endregion

        #region LoadContent

        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            _spriteBatch = new SpriteBatch(GraphicsDevice);
            Services.AddService(typeof(SpriteBatch), _spriteBatch);

            _bg = Content.Load<Texture2D>(@"sprites\bg_green");
            _roadTex = Content.Load<Texture2D>(@"sprites\road");
            _carRadio = Content.Load<Texture2D>(@"sprites\Radio\XMRadio");
            _radioFontScreen = Content.Load<SpriteFont>(@"Fonts\RadioFontOne");
            _radioFontButtons = Content.Load<SpriteFont>(@"Fonts\RadioFontButtons");
            _titleFont = Content.Load<SpriteFont>(@"Fonts\title");
            _selectionFont = Content.Load<SpriteFont>(@"Fonts\selection");
            _messageBoxFont = Content.Load<SpriteFont>(@"Fonts\messageFont");
            _radio = new Radio();
            _radio.LoadContent(Content);

            //load sound effects
            _potholeSound = Content.Load<SoundEffect>(@"SFX\PotHole");
            _potholeSoundInstance = _potholeSound.CreateInstance();

            //init roads
            _road1 = new Road(this, 5.0F) { Texture = _roadTex, Speed = 4.0F };
            _road1.PutInStartPosition(-1536);

            _road2 = new Road(this, 5.0F) { Texture = _roadTex, Speed = 4.0F };
            _road2.PutInStartPosition(-768);

            _road3 = new Road(this, 5.0F) { Texture = _roadTex, Speed = 4.0F };
            _road3.PutInStartPosition(0);

            //init title
            var pos = new Vector2((GraphicsDevice.Viewport.Width/2) - (_titleFont.MeasureString("Tro Tro").X/2),
                                  GraphicsDevice.Viewport.Height/5);

            _title = new Text("Tro Tro", _titleFont, pos);

            //play
            pos = new Vector2((GraphicsDevice.Viewport.Width / 2) - (_selectionFont.MeasureString("Play").X / 2),
                                  (GraphicsDevice.Viewport.Height / 5) + 200);
            _play = new Text("Play", _selectionFont, pos) {Color = Color.GreenYellow};

            //try again
            pos.X = (GraphicsDevice.Viewport.Width / 2) - (_selectionFont.MeasureString("Try Again").X / 2);
            _tryAgain = new Text("Try Again", _selectionFont, pos) {Color = Color.GreenYellow};

            //exit
            pos.Y += 50;
            pos.X = (GraphicsDevice.Viewport.Width/2) - (_selectionFont.MeasureString("Exit").X/2);
            _exit = new Text("Exit", _selectionFont, pos);

            //exit to main menu
            pos.X = (GraphicsDevice.Viewport.Width / 2) - (_selectionFont.MeasureString("Exit to Main Menu").X / 2);
            _exitToMenu = new Text("Exit to Main Menu", _selectionFont, pos);

            _messageBox = Content.Load<Texture2D>(@"sprites\Message\sideMessageBox");

            #region Message Box strings

            //String contents for messages
            //Message 1
            _msg1_1 = "You are swurving too";
            _msg1_2 = "much, Jared threw up";
            _msg1_3 = "in the front seat. You";
            _msg1_4 = "lose 250 points!";
            //Message 2
            _msg2_1 = "Had to pull over and";
            _msg2_2 = "find a bathroom for";
            _msg2_3 = "Prof. Fry, because";
            _msg2_4 = "he got runny tummy.";
            _msg2_5 = "You lose 150 points.";
            //Message 3
            _msg3_1 = "Cameron got hit by a";
            _msg3_2 = "tree, had to stop and";
            _msg3_3 = "give him first aid.";
            _msg3_4 = "You lose 400 points.";
            //Message 4
            _msg4_1 = "Ryan said a funny";
            _msg4_2 = "'that's what she said'";
            _msg4_3 = "joke. You gain 1000!";
            _msg4_4 = "points.";
            //Message 5
            _msg5_1 = "Cameron  bought a";
            _msg5_2 = "funny item at the";
            _msg5_3 = "market. ;-)";
            _msg5_4 = "You gain 750 points!";
            //Message 6
            _msg6_1 = "Radio was too loud";
            _msg6_2 = "and you made Matt's";
            _msg6_3 = "ear infection flare up.";
            _msg6_4 = "You lose 200 points";
            //Message 7
            _msg7_1 = "Blaine saw his first";
            _msg7_2 = "naked girl. You lose";
            _msg7_3 = "450 points.";

            #endregion
        }

        #endregion

        #region Update

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if ((GamePad.GetState(PlayerIndex.One).Buttons.Start == ButtonState.Pressed)
                || (Keyboard.GetState().IsKeyDown(Keys.Escape)))
            {
                Exit();
            }

            if(Keyboard.GetState().IsKeyDown(Keys.E))
            {
                _ended = true;
            }

            if(!_started)
            {
                if (Keyboard.GetState().IsKeyDown(Keys.Enter))
                {
                    switch (_selected)
                    {
                        case Play: 
                            Start();
                            break;
                        case EXIT:
                            Exit();
                            break;
                    }
                }

                if (Keyboard.GetState().IsKeyDown(Keys.Down))
                {
                    switch (_selected)
                    {
                        case Play:
                            _play.Color = Color.White;
                            break;

                        case EXIT:
                            _exit.Color = Color.White;
                            break;
                    }
                    _selected = (_selected + 1)%MainMenuItemCount;
                    switch (_selected)
                    {
                        case Play:
                            _play.Color = Color.GreenYellow;
                            break;

                        case EXIT:
                            _exit.Color = Color.GreenYellow;
                            break;
                    }
                }
            }

            //update road
            _road1.Update(gameTime);
            _road2.Update(gameTime);
            _road3.Update(gameTime);

            //update hud
            if (_started && !_ended)
            {
                //update tro tro
                _troTro.Update(gameTime);

                var messageTick = Environment.TickCount;

                if (messageTick % 600 == 0 && _dispMessage)
                    _dispMessage = false;

                if (messageTick % 3000 == 0)
                {
                    //Set add score to false so that it changes score
                    _scoreAdded = false;

                    //Random varable
                    var rand = new Random();

                    var number = rand.Next(1, 8);

                    _dispNumber = Convert.ToInt32(number);

                    _dispMessage = true;
                }

                //update potholes
                foreach (var pothole in _potholes)
                {
                    pothole.Update(gameTime);
                }
                _radio.Update(gameTime);
                _score.Update();

                var tick = Environment.TickCount;
                if (tick%100 == 0)
                {
                    RoadSpeed += 0.10F;
                    var rand = new Random();
                    var amount = rand.Next(3) + 1;
                    while(amount-- > 0)
                        _potholes.Add(new Pothole(this, new Vector2(50, Screenwidth - 100)) { Speed = RoadSpeed });
                    _road1.Speed = RoadSpeed;
                    _road2.Speed = RoadSpeed;
                    _road3.Speed = RoadSpeed;
                    //CarSpeed = MathHelper.Clamp(CarSpeed, RoadSpeed, 1000.0F);
                }

                var delete =
                    _potholes.Where(
                        pothole => pothole.Position.Y > (pothole.Texture.Height + GraphicsDevice.Viewport.Height)).
                        ToList();
                foreach (var pothole in delete)
                {
                    _potholes.Remove(pothole);
                }

                #region Collisions

                foreach (var pothole in _potholes.Where(pothole => _troTro != null))
                {
                    if (_troTro.GetLeftBounds().Intersects(pothole.GetBounds()))
                    {
                        //add damage to left
                        _troTro.LeftTireHealth -= 1;
                        _playNoise = true;
                        //Console.WriteLine("Left tire: " + _troTro.LeftTireHealth);
                    }
                    if (_troTro.GetRightBounds().Intersects(pothole.GetBounds()))
                    {
                        //add damage to right
                        _troTro.RightTireHealth -= 1;
                        _playNoise = true;
                        //Console.WriteLine("Right tire: " + _troTro.RightTireHealth);
                    }
                    if (_troTro.GetLeftRearBounds().Intersects(pothole.GetBounds()))
                    {
                        //Adds damage to left rear tire
                        _troTro.LeftBackTireHealth -= 1;
                        _playNoise = true;
                        //Console.WriteLine("Left Rear: " + _troTro.LeftBackTireHealth);
                    }
                    if(_troTro.GetRightRearBounds().Intersects(pothole.GetBounds()))
                    {
                        //Adds damage to right rear tire
                        _troTro.RightBackTireHealth -= 1;
                        _playNoise = true;
                        //Console.WriteLine("Right Rear: " + _troTro.RightBackTireHealth);
                    }
                    if (_potholeSoundInstance.State == SoundState.Playing || !_playNoise) continue;
                    _potholeSoundInstance.Play();
                    _playNoise = false;
                }

                #endregion

                //check car health to see if totalled
                if (_troTro != null)
                    if(_troTro.LeftTireHealth == 0 && _troTro.RightTireHealth == 0)
                    {
                        _ended = true;
                    }
            }
            else if(_ended)
            {
                EndGame();
            }

            base.Update(gameTime);
        }

        #endregion

        #region Draw

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            _spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);

            //draw bg
            _spriteBatch.Draw(_bg, new Rectangle(0, 0,
                        _graphics.GraphicsDevice.DisplayMode.Width,
                        _graphics.GraphicsDevice.DisplayMode.Height),
                        Color.LightGray);

            ////draw road 1
            _spriteBatch.Draw(_road1.Texture, new Rectangle(
                        Convert.ToInt32(_graphics.GraphicsDevice.DisplayMode.Width / 50),
                        Convert.ToInt32(_road1.Position.Y),
                        Convert.ToInt32(_graphics.GraphicsDevice.DisplayMode.Width / 1.2),
                        GraphicsDevice.DisplayMode.Height),
                        Color.LightGray);

            ////draw road 2
            _spriteBatch.Draw(_road2.Texture, new Rectangle(
                        Convert.ToInt32(_graphics.GraphicsDevice.DisplayMode.Width / 50),
                        Convert.ToInt32(_road2.Position.Y),
                        Convert.ToInt32(_graphics.GraphicsDevice.DisplayMode.Width / 1.2),
                        GraphicsDevice.DisplayMode.Height),
                        Color.LightGray);

            ////draw road 3
            _spriteBatch.Draw(_road3.Texture, new Rectangle(
                        Convert.ToInt32(_graphics.GraphicsDevice.DisplayMode.Width / 50),
                        Convert.ToInt32(_road3.Position.Y),
                        Convert.ToInt32(_graphics.GraphicsDevice.DisplayMode.Width / 1.2),
                        GraphicsDevice.DisplayMode.Height),
                        Color.LightGray);


            if (!_started)
            {
                // draw tro tro title
                _title.Draw(_spriteBatch);
                _play.Draw(_spriteBatch);
                _exit.Draw(_spriteBatch);
            }

            if(_ended)
            {
                //draw end menu
                _title.Draw(_spriteBatch);
                _displayScore.Draw(_spriteBatch);
                _tryAgain.Draw(_spriteBatch);
                _exitToMenu.Draw(_spriteBatch);
            }

            if (_started && !_ended)
            {
                //draw any potholes
                foreach (var pothole in _potholes)
                {
                    pothole.Draw(gameTime);
                }

                //************Draw message box**************

                if(_dispMessage == true)
                {
                    //Creates the message box for the message to appear
                    _spriteBatch.Draw(_messageBox, new Rectangle(0, 50, 260, 150), new Rectangle(0, 0, 220, 510), Color.White);

                    switch (_dispNumber)
                    {
                        case 1:
                            _spriteBatch.DrawString(_messageBoxFont, _msg1_1, new Vector2(15, 60), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg1_2, new Vector2(15, 80), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg1_3, new Vector2(15, 100), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg1_4, new Vector2(15, 120), Color.White);

                            if (!_scoreAdded)
                            {
                                _score.AddScore(-250);
                                _scoreAdded = true;
                            }

                            break;
                        case 2:
                            _spriteBatch.DrawString(_messageBoxFont, _msg2_1, new Vector2(15, 60), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg2_2, new Vector2(15, 80), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg2_3, new Vector2(15, 100), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg2_4, new Vector2(15, 120), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg2_5, new Vector2(15, 140), Color.White);

                            if (!_scoreAdded)
                            {
                                _score.AddScore(-150);
                                _scoreAdded = true;
                            }
                            break;
                        case 3:
                            _spriteBatch.DrawString(_messageBoxFont, _msg3_1, new Vector2(15, 60), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg3_2, new Vector2(15, 80), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg3_3, new Vector2(15, 100), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg3_4, new Vector2(15, 120), Color.White);

                            if (!_scoreAdded)
                            {
                                _score.AddScore(-400);
                                _scoreAdded = true;
                            }
                            break;
                        case 4:
                            _spriteBatch.DrawString(_messageBoxFont, _msg4_1, new Vector2(15, 60), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg4_2, new Vector2(15, 80), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg4_3, new Vector2(15, 100), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg4_4, new Vector2(15, 120), Color.White);

                            if (!_scoreAdded)
                            {
                                _score.AddScore(1000);
                                _scoreAdded = true;
                            }

                            break;
                        case 5:
                            _spriteBatch.DrawString(_messageBoxFont, _msg5_1, new Vector2(15, 60), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg5_2, new Vector2(15, 80), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg5_3, new Vector2(15, 100), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg5_4, new Vector2(15, 120), Color.White);

                            if (!_scoreAdded)
                            {
                                _score.AddScore(750);
                                _scoreAdded = true;
                            }

                            break;
                        case 6:
                            _spriteBatch.DrawString(_messageBoxFont, _msg6_1, new Vector2(15, 60), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg6_2, new Vector2(15, 80), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg6_3, new Vector2(15, 100), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg6_4, new Vector2(15, 120), Color.White);

                            if (!_scoreAdded)
                            {
                                //_score.SubScore(-200);
                                _score.AddScore(-450);
                                _scoreAdded = true;
                            }
                            break;
                        case 7:
                            _spriteBatch.DrawString(_messageBoxFont, _msg7_1, new Vector2(15, 60), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg7_2, new Vector2(15, 80), Color.White);
                            _spriteBatch.DrawString(_messageBoxFont, _msg7_3, new Vector2(15, 100), Color.White);

                            if (!_scoreAdded)
                            {
                                //_score.SubScore(-450);
                                _score.AddScore(-450);
                                _scoreAdded = true;
                            }

                            break;
                    }
                }

                //******************************************

                _troTro.Draw(gameTime);

                /*****************************
                 * Start building car radio
                *****************************/

                _spriteBatch.Draw(_carRadio, new Rectangle(450, 10, 300, 50), new Rectangle(1, 3, 965, 196), Color.White);

                _spriteBatch.DrawString(_radioFontScreen, "Artist: " + _radio.ArtistName, new Vector2(540, 20),
                                        Color.Black);

                _spriteBatch.DrawString(_radioFontScreen, "Song Title: " + _radio.SongName, new Vector2(540, 32),
                                        Color.Black);

                _spriteBatch.DrawString(_radioFontButtons, "F1/F4", new Vector2(549, 46), Color.White);

                _spriteBatch.DrawString(_radioFontButtons, "F2/F5", new Vector2(588, 46), Color.White);

                _spriteBatch.DrawString(_radioFontButtons, "F3/F6", new Vector2(628, 46), Color.White);

                _spriteBatch.DrawString(_radioFontScreen, "Volume Control", new Vector2(676, 51), Color.White);

                /*****************************
                 * End building car radio
                *****************************/

                _carHealth.Draw(_spriteBatch);
                _timing.Draw(_spriteBatch);
                _score.Draw(_spriteBatch, gameTime);
                _speedGauge.Draw(_spriteBatch, RoadSpeed, CarSpeed);
            }
            base.Draw(gameTime);
            _spriteBatch.End();
        }

        #endregion

        #endregion

        #region Methods

        #region Start

        private void Start()
        {
            _started = true;
            _ended = false;

            _troTro = new TroTro(this)
            {
                Position =
                    new Vector2(GraphicsDevice.Viewport.Width / 2.0F, GraphicsDevice.Viewport.Height - 100),
                Screenbounds = new Vector2(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height)
            };

            _potholes = new List<Pothole>();
            RoadSpeed = 4.0F;
            _score = new Score(this);
            _timing = new Timing(this, Environment.TickCount);
            _carHealth = new CarHealth(this, _troTro);
            _carHealth.LoadContent(Content);
            _speedGauge = new SpeedGauge(this, new Vector2(Screenwidth, Screenheight));

            //readjust roads
            _road1.PutInStartPosition(-1536);
            _road1.Speed = CarSpeed;
            _road2.PutInStartPosition(-768);
            _road2.Speed = CarSpeed;
            _road3.PutInStartPosition(0);
            _road3.Speed = CarSpeed;
        }

        #endregion

        #region EndGame

        public void EndGame()
        {
            if (_troTro != null)
            {
                _endScore = Convert.ToString(_score.CurrentScore);
                var pos = new Vector2((GraphicsDevice.Viewport.Width / 2) - (_selectionFont.MeasureString("Your Score" + _endScore).X / 2),
                                  (GraphicsDevice.Viewport.Height / 5) + 130);
                _displayScore = new Text("Your Score: " + _endScore, _selectionFont, pos);
                _troTro = null;
            }
            _potholes.Clear();
            var kb = Keyboard.GetState();
            //select menu selection
            if(kb.IsKeyDown(Keys.Enter))
            {
                switch (_endSelected)
                {
                    case TryAgain:
                        Start();
                        break;

                    case ExitToMenu:
                        _started = false;
                        _ended = false;
                        break;
                }
            }

            //move selection on menu down
            if(kb.IsKeyDown(Keys.Down))
            {
                switch (_endSelected)
                {
                    case TryAgain:
                        _tryAgain.Color = Color.White;
                        break;

                    case EXIT:
                        _exitToMenu.Color = Color.White;
                        break;
                }

                _endSelected = (_endSelected + 1) % EndMenuItemCount;

                switch (_endSelected)
                {
                    case Play:
                        _tryAgain.Color = Color.GreenYellow;
                        break;

                    case EXIT:
                        _exitToMenu.Color = Color.GreenYellow;
                        break;
                }
            }

            //move selection on menu down
            if (kb.IsKeyDown(Keys.Up))
            {
                switch (_endSelected)
                {
                    case TryAgain:
                        _tryAgain.Color = Color.White;
                        break;

                    case EXIT:
                        _exitToMenu.Color = Color.White;
                        break;
                }

                _endSelected = (_endSelected - 1) % EndMenuItemCount;

                switch (_endSelected)
                {
                    case Play:
                        _tryAgain.Color = Color.GreenYellow;
                        break;

                    case EXIT:
                        _exitToMenu.Color = Color.GreenYellow;
                        break;
                }
            }
        }

        #endregion

        #endregion
    }
}
